package animal;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-06-26
 * Time: 22:15
 */
public class Fish extends Animal{

    @Override
    public/*权限要大于等于，父类被重写方法的，修饰权限*/ void eat() {
        super.name = "jiji";
        super.eat();
    }

    public  void func1(Animal animal) {
        animal.eat();
    }


    public static void main(String[] args) {
        Fish fish = new Fish();
        fish.eat();
    }
}
